package bit_pratice.day2;

/**
 * @author 美女
 * @date 2022/04/18 19:32
 **/

import java.util.Scanner;

/**
 * 逆置字符串,带标点符号
 */
public class Num2 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        String str= sc.nextLine();
        //此时得到字符串
        //进行字符串逆置
        //字符串以空格为单位拆分为字符串数组
        String[] arr= str.split(" ");
//        System.out.println(Arrays.toString(arr));
        int start=0;
        int end=arr.length-1;
        while(start<end){
            String temp=arr[start];
            arr[start]=arr[end];
            arr[end]=temp;
            start++;
            end--;
        }
        //字符串数组转为字符串
        String s="";
        for (int i = 0; i < arr.length; i++) {
            s=s+arr[i]+" ";
        }
        System.out.println(s);
    }
}
